import csv
from os import write

# 操作文件对象时，需要添加newline参数逐行写入，否则会出现空行现象
with open('fggs.csv', newline='') as csvfile:
    reader = csv.DictReader(csvfile)
    for row in reader:
        print(row['first_name'], row['last_name'])
